package com.gdssoft.framework.service.system.impl;
/*
 *  捷达世软件(深圳)有限公司
 *  Copyright (C) 2008-2010 ShenZhen JieDaShi Software Limited Company. 
*/
import java.util.List;

import com.gdssoft.framework.dao.system.DepartmentDao;
import com.gdssoft.framework.model.system.Department;
import com.gdssoft.framework.model.system.Employee;
import com.gdssoft.framework.service.system.DepartmentService;
import com.gdssoft.core.Constants;
import com.gdssoft.core.command.QueryFilter;
import com.gdssoft.core.service.impl.BaseServiceImpl;
import com.gdssoft.core.web.paging.PagingBean;

public class DepartmentServiceImpl extends BaseServiceImpl<Department> implements
		DepartmentService {
	
	private DepartmentDao dao;
	
	public DepartmentServiceImpl(DepartmentDao dao) {
		super(dao);
		this.dao=dao;
	}
	
	@Override
	public List<Department> findByParentId(Long parentId) {
		return findByParentId(parentId, null);
	}
	
	@Override
	public List<Department> findByParentId(Long parentId, PagingBean pb) {
		return dao.findByParentId(parentId, pb);
	}
	
	@Override
	public List<Department> findByPath(String path) {
		return findByPath(path, null);
	}
	
	@Override
	public List<Department> findByPath(String path, PagingBean pb) {
		return dao.findByPath(path, pb);
	}

	@Override
	public List<Department> findByParentId(Long parentId, Integer depLevel,
			PagingBean pb) {
		return dao.findByParentId(parentId,depLevel, pb);
	}

	@Override
	public List<Department> getByOfficeId(Long officeId) {
		return dao.getByOfficeId(officeId,null);
	}

	@Override
	public List<Department> getByCompanyId(Long companyId) {
		return dao.getByCompanyId(companyId,null);
	}

	@Override
	public List<Department> findByPath(String path, int level) {
		return dao.findByPath(path, level);
	}
	
}
